/*
 * Copyright (C), 2019, 派光信息技术有限公司
 * Description: 供需深圳下坪场系统
 */
package math;

import java.math.BigDecimal;

public class Demo {
	public static void main(String[] args) {
		double x = -2.086;
		double y = 0.5;
		double z = 0.000004;
		System.out.println(Math.sqrt(z));
		BigDecimal b_x = new BigDecimal(String.valueOf(x));
		BigDecimal result = b_x.multiply(b_x);
		System.out.println(result.doubleValue());
		System.out.println(x+y);
		
		double dVariationPlaneX = -2.086;
		double dVariationPlaneY = 1.852;
		double dVariationPlaneH = -0.48;
		BigDecimal bX = new BigDecimal(String.valueOf(dVariationPlaneX));
		BigDecimal bY = new BigDecimal(String.valueOf(dVariationPlaneY));
		BigDecimal bH = new BigDecimal(String.valueOf(dVariationPlaneH));
		BigDecimal bX2 = bX.multiply(bX);
		BigDecimal bY2 = bY.multiply(bY);
		BigDecimal bH2 = bH.multiply(bH);
		BigDecimal r = bX2.add(bY2).add(bH2);
		double A = Math.sqrt(r.doubleValue());
		System.out.println(A);
		
	}

}
